package com.zyb.springcloud.controller;


import com.zyb.springcloud.entities.CommonResult;
import com.zyb.springcloud.service.OrderFeginService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderFeginController {

    @Resource
    private OrderFeginService orderFeginService;

    /**
     * 使用Feign调用支付微服务
     * @param id
     * @return
     */
    @GetMapping(value="/consumer/feign/payment/get/{id}")
    public CommonResult getPaymentById(@PathVariable Long id){
        return orderFeginService.getPaymentById(id);
    }

}
